package net.stogi.unicore.beyond.back.bootstrap.model;

import net.stogi.unicore.beyond.back.dao.InputTypeDao;
import net.stogi.unicore.beyond.back.dao.OutputTypeDao;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class BootStrapRunner {

	public static final void main(String[] args) throws Exception {
		ApplicationContext context = new ClassPathXmlApplicationContext(
				"classpath:net/stogi/unicore/beyond/back/conf/spring/hibernate-config.xml",
				"classpath:net/stogi/unicore/beyond/back/conf/spring/service-config.xml",
				"classpath:net/stogi/unicore/beyond/back/conf/spring/transaction-config.xml",
				"classpath:net/stogi/unicore/beyond/back/conf/spring/webapp-config.xml");

		BootStrapModel bootStrapModel = new BootStrapModel(context.getBean(InputTypeDao.class), context.getBean(OutputTypeDao.class));
		bootStrapModel.bootstrapInputTypes();
		bootStrapModel.bootstrapOutputTypes();
	}
}
